<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
</head>
<body>
<div th:if="${success}" th:text="${success}"></div>
<div th:if="${error}" th:text="${error}"></div>

<form action="register" method="post" th:object="${user}">
    姓名： <input type="text" name="name" th:field="*{username}">
    密码：<input type="password" name="password" th:field="*{password}" ></input>
    <input type="submit" value="提交"></input>
</form>
</body>
</html>